package com.yycx.module.bus.provider.handler;

import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.mybatis.interceptor.GetInterceptor;
import com.yycx.common.mybatis.model.ResultBody;
import com.yycx.common.mybatis.query.CriteriaQuery;
import com.yycx.module.bus.client.entity.BusDept;
import com.yycx.module.bus.client.entity.BusSaleman;
import org.springframework.stereotype.Component;

/**
 * 部门自定义列表
 *
 * @author zyf
 */
@Component("deptGetHandler")
public class DeptGetHandler implements GetInterceptor {


    @Override
    public ResultBody validate(CriteriaQuery cq, EntityMap params) {
        return ResultBody.ok();
    }

    @Override
    public void prepare(CriteriaQuery cq, EntityMap entityMap) {
        cq.select(BusDept.class, "*");
        cq.addSelect(BusSaleman.class, "saleManName");
        cq.createJoin(BusSaleman.class);
    }


}
